package com.immunology.service.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.immunology.dao.RoleDao;
import com.immunology.domain.Role;
import com.immunology.exception.DaoException;
import com.immunology.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService{

	@Autowired
	private RoleDao roleDao;
	
	@Override
	public Role findById(Long id) throws DaoException {
		return roleDao.findById(id);
	}

	@Override
	public List<Role> getAll() throws DaoException {
		return roleDao.getAll();
	}

	@Override
	public void saveOrUpdate(Collection<Role> entities) throws DaoException {
		roleDao.saveOrUpdate(entities);
	}

	@Override
	public void saveOrUpdate(Role... entities) throws DaoException {
		roleDao.saveOrUpdate(entities);
	}

	@Override
	public void update(Collection<Role> entities) throws DaoException {
		roleDao.update(entities);
	}

	@Override
	public void update(Role... entities) throws DaoException {
		roleDao.update(entities);
	}

	@Override
	public void delete(Collection<Role> entities) throws DaoException {
		roleDao.delete(entities);
	}
	
	@Override
	public void delete(Role... entities) throws DaoException {
		roleDao.delete(entities);
	}
	
	@Override
	public void deleteAll() throws DaoException {
		roleDao.deleteAll();
	}

	@Override
	public void save(Collection<Role> entities) throws DaoException {
		roleDao.save(entities);
	}

	@Override
	public void save(Role... entities) throws DaoException {
		roleDao.save(entities);
	}

}
